package com.financing.wap.dao.impl;


import java.sql.SQLException;
import java.util.List;
import java.util.Map;
import org.springframework.stereotype.Repository;
import com.financing.wap.dto.SalesPrizesPeopleDTO;
import com.financing.wap.dao.ISalesPrizesPeopleDao;
import com.financing.wap.common.SqlName;
/**
 * sales_prizes_people  
 * 销售抽奖人数 数据访问层实现类
 * @author huqiyun
 *
 */
 
@Repository("salesPrizesPeopleDao")
public class SalesPrizesPeopleDaoImpl extends BaseDaoImpl<SalesPrizesPeopleDTO, java.lang.Integer> implements ISalesPrizesPeopleDao {


	@Override
	public int insert(SalesPrizesPeopleDTO salesPrizesPeople) throws SQLException {
		return (Integer) this.sqlMapClientTemplate.insert(SqlName.SalesPrizesPeopleSql.insert, salesPrizesPeople);
	}

	@Override
	public void update(SalesPrizesPeopleDTO salesPrizesPeople) throws SQLException {
		this.sqlMapClientTemplate.update(SqlName.SalesPrizesPeopleSql.update, salesPrizesPeople);
	}

	@Override
	public void updateForce(SalesPrizesPeopleDTO salesPrizesPeople) throws SQLException {
		this.sqlMapClientTemplate.update(SqlName.SalesPrizesPeopleSql.updateForce, salesPrizesPeople);
	}

	@Override
	public void delete(Integer id) throws SQLException {
		this.sqlMapClientTemplate.delete(SqlName.SalesPrizesPeopleSql.delete,id);
	}
	
	@SuppressWarnings("unchecked")	
	@Override
	public List<SalesPrizesPeopleDTO> queryList(SalesPrizesPeopleDTO salesPrizesPeople) throws SQLException {
		return this.sqlMapClientTemplate.queryForList(SqlName.SalesPrizesPeopleSql.queryList, salesPrizesPeople);
	}

	@Override
	public int queryListCount(SalesPrizesPeopleDTO salesPrizesPeople) throws SQLException {
		return (Integer) this.sqlMapClientTemplate.queryForObject(SqlName.SalesPrizesPeopleSql.queryListCount, salesPrizesPeople);
	}

	@Override
	public SalesPrizesPeopleDTO loadById(Integer id) throws SQLException {
		return  (SalesPrizesPeopleDTO)this.getSqlMapClientTemplate().queryForObject(SqlName.SalesPrizesPeopleSql.loadById,id);
	}

	@Override
	public Class<SalesPrizesPeopleDTO> getEntityClass() {
		return SalesPrizesPeopleDTO.class;
	}
 	
}
